#{extends 'admin/main.html' /}
#{set title:'Notice' /}

#{form @admin.Users.editb()}
<table>
	<tr>
		<td>ID</td>
		<td>
			<input type="hidden" name="id" value="${user.id}" />
			<input type="text" name="userId" value="${user.userId}" readonly="readonly" />
		</td>
	</tr>
	<tr>
		<td>이름</td>
		<td><input type="text" name="name" value="${user.name}"/>
			<span class="error">#{error 'name' /}</span></td>
	</tr>
	<tr>
		<td>패스워드</td>
		<td><input type="password" name="password" value="${user.password}"/>
			<span class="error">#{error 'password' /}</span>
		</td>
	</tr>
	<tr>
		<td>패스워드 확인</td>
		<td><input type="password" name="password_confirm" value="${user.password}"/>
			<span class="error">#{error 'password_confirm' /}</span>
		</td>
	</tr>
	<tr>
		<td>권한</td>
		<td>
			#{list items:roles, as:'role'}
			%{if(user.roleSet.contains(role)){checked="checked=\'checked\'";}else{checked="";}}%
			<input type="checkbox" name="${role}" id="${role}" ${checked}/>
			<label for="${role}">${role}</label>
			#{/list}
		</td>
	</tr>
</table>

<input type="submit" value="저장" />
#{/form}